package cn.lijiguo.concurrency.part1.uncaughtexception;

/**
 * ExceptionInChildThread
 * 演示子线程中的异常处理
 * @author lijiguo
 * @date 2020/1/7 16:12
 */
public class ExceptionInChildThread implements Runnable {

    public static void main(String[] args) {
        new Thread(new ExceptionInChildThread(), "childThread").start();

        for (int i = 0; i < 1000; i++) {
            System.out.println(i);
        }
    }

    @Override
    public void run() {
        throw new RuntimeException("子线程执行异常");
    }
}
